﻿namespace UnityEngine
{
    using System;
    using System.Runtime.InteropServices;

    [StructLayout(LayoutKind.Sequential)]
    public struct AnimatorStateInfo
    {
        private int m_Name;
        private float m_NormalizedTime;
        private float m_Length;
        private int m_Tag;
        private int m_Loop;
        public bool IsName(string name)
        {
            return (Animator.StringToHash(name) == this.m_Name);
        }

        public int nameHash
        {
            get
            {
                return this.m_Name;
            }
        }
        public float normalizedTime
        {
            get
            {
                return this.m_NormalizedTime;
            }
        }
        public float length
        {
            get
            {
                return this.m_Length;
            }
        }
        public int tagHash
        {
            get
            {
                return this.m_Tag;
            }
        }
        public bool IsTag(string tag)
        {
            return (Animator.StringToHash(tag) == this.m_Tag);
        }

        public bool loop
        {
            get
            {
                return (this.m_Loop != 0);
            }
        }
    }
}

